package com.mall.futurmall.coupon.controller;

import com.mall.futurmall.common.utils.R;
import com.mall.futurmall.coupon.entity.SmsCouponEntity;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Arrays;

/**
 * 优惠券信息
 *
 * @author sourceCoder
 * @email lizehuacoder@yeah.net
 * @date 2020-08-31 15:59
 */
@RefreshScope
@RestController
@RequestMapping("coupon/coupon")
public class CouponController {

    @Value("${coupon.user.name}")
    private String name;
    @Value("${coupon.user.age}")
    private String age;
    @RequestMapping("/member/list")
    public R memberCoupons(){
        SmsCouponEntity coupon = new SmsCouponEntity();
        coupon.setCouponName("满一百减10");
        return R.ok().put("coupon", Arrays.asList());
    }

    @RequestMapping("/test")
    public R test(){
        return R.ok().put("name",name).put("age",age);
    }
}
